//
//  HeaderTableViewCell.m
//  SuperNews
//
//  Created by dllo on 16/1/14.
//  Copyright © 2016年 qiang. All rights reserved.
//

#import "HeaderTableViewCell.h"

@implementation HeaderTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.imageV = [[UIImageView alloc] init];
    self.imageV.backgroundColor = [UIColor greenColor];
    self.imageV.layer.cornerRadius = 20;
    self.imageV.layer.masksToBounds = YES;
    [self.contentView addSubview:self.imageV];
    
    self.label = [[UILabel alloc] init];
    self.label.font = [UIFont systemFontOfSize:15.0];
    [self.contentView addSubview:self.label];
    
    self.labelNext = [[UILabel alloc] init];
    self.labelNext.font = [UIFont systemFontOfSize:15.0];
    self.labelNext.textColor = [UIColor colorWithRed:0.4245 green:0.4245 blue:0.4245 alpha:1.0];
    self.labelNext.textAlignment = NSTextAlignmentRight;
    self.labelNext.text = @"进入";
    [self.contentView addSubview:self.labelNext];
    
    self.imageVNext = [[UIImageView alloc] init];
    self.imageVNext.image = [UIImage imageNamed:@"setting_cell_arrow"];
    [self.contentView addSubview:self.imageVNext];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageV.frame = CGRectMake(10, 5, 40, 40);
    self.label.frame = CGRectMake(60, 5, 150, 40);
    self.labelNext.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 90, 5, 60, 40);
    self.imageVNext.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 20, 20, 10, 10);
}

@end
